﻿using PHMEE.EnergyEfficiency;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PHMEE
{
    public class UnitMainModel
    {
        /// <summary>
        /// 主机状态时间戳
        /// </summary>
        public DateTime? MainEngineStatusTs { get; set; }

        /// <summary>
        /// 主机状态原始Td值
        /// </summary>
        public string MainEngineStatusOrg { get; set; }

        /// <summary>
        /// 主机状态
        /// </summary>
        public string MainEngineStatus => MainEngineStatusOrg?.ToUpper();

        /// <summary>
        /// 当前燃油类型时间戳
        /// </summary>
        public DateTime? FuelTypeTs { get; set; }

        /// <summary>
        /// 当前燃油类型原始Td值
        /// </summary>
        public int? FuelTypeOrg { get; set; }

        /// <summary>
        /// 当前燃油类型
        /// </summary>
        public string FuelType => FuelTypeOrg != null ? $"{(FuelType)FuelTypeOrg}" : string.Empty;

        /// <summary>
        /// 主机功率时间戳
        /// </summary>
        public DateTime? MainEnginePowerKwTs { get; set; }

        /// <summary>
        /// 主机功率原始Td值
        /// </summary>
        public float? MainEnginePowerKwOrg { get; set; }

        /// <summary>
        /// 主机功率
        /// </summary>
        public string MainEnginePowerKw => MainEnginePowerKwOrg?.ToString();

        /// <summary>
        /// 主机最大功率（额定功率）
        /// </summary>
        public double? MaxMainEnginePower { get; set; }


        /// <summary>
        /// 主机负荷时间戳
        /// </summary>
        public DateTime? MainEngineLoadTs { get; set; }

        /// <summary>
        /// 主机负荷原始Td值
        /// </summary>
        public float? MainEngineLoadOrg { get; set; }

        /// <summary>
        /// 主机负荷
        /// </summary>
        public string MainEngineLoad => MainEngineLoadOrg?.ToString();


        /// <summary>
        /// 主机转速时间戳
        /// </summary>
        public DateTime? MainEngineSpeedRpmTs { get; set; }

        /// <summary>
        /// 主机转速原始Td值
        /// </summary>
        public float? MainEngineSpeedRpmOrg { get; set; }

        /// <summary>
        /// 主机转速
        /// </summary>
        public string MainEngineSpeedRpm => MainEngineSpeedRpmOrg?.ToString();


        /// <summary>
        /// 主机即时油耗时间戳
        /// </summary>
        public DateTime? MainEngineInstantTs { get; set; }

        /// <summary>
        /// 主机即时油耗原始Td值
        /// </summary>
        public float? MainEngineInstantOrg { get; set; }

        /// <summary>
        /// 主机即时油耗
        /// </summary>
        public string MainEngineInstant => MainEngineInstantOrg?.ToString();

        /// <summary>
        /// 扫气压力时间戳
        /// </summary>
        public DateTime? ScavengePressureTs { get; set; }

        /// <summary>
        /// 扫气压力Td原始值
        /// </summary>
        public float? ScavengePressureOrg { get; set; }

        /// <summary>
        /// 扫气压力
        /// </summary>
        public string ScavengePressure => ScavengePressureOrg?.ToString();

        /// <summary>
        /// 主机角度编码器时间戳
        /// </summary>
        public DateTime? EngineAngleEncoderTs { get; set; }

        /// <summary>
        /// 主机角度编码器Td原始值
        /// </summary>
        public float? EngineAngleEncoderOrg { get; set; }

        /// <summary>
        /// 主机角度编码器
        /// </summary>
        public string EngineAngleEncoder => EngineAngleEncoderOrg?.ToString();

        /// <summary>
        /// 缸套冷却水进机压力时间戳
        /// </summary>
        public DateTime? CylinderWaterInPressureTs { get; set; }

        /// <summary>
        /// 缸套冷却水进机压力Td原始值
        /// </summary>
        public float? CylinderWaterInPressureOrg { get; set; }

        /// <summary>
        /// 缸套冷却水进机压力
        /// </summary>
        public string CylinderWaterInPressure => CylinderWaterInPressureOrg?.ToString();

        /// <summary>
        /// 缸套冷却水进机温度时间戳
        /// </summary>
        public DateTime? CylinderWaterInTempTs { get; set; }

        /// <summary>
        /// 缸套冷却水进机温度Td原始值
        /// </summary>
        public float? CylinderWaterInTempOrg { get; set; }

        /// <summary>
        /// 缸套冷却水进机温度
        /// </summary>
        public string CylinderWaterInTemp => CylinderWaterInTempOrg?.ToString();

        /// <summary>
        /// 扫气箱温度时间戳
        /// </summary>
        public DateTime? ScavengeBoxTempTs { get; set; }

        /// <summary>
        /// 扫气箱温度Td原始值
        /// </summary>
        public float? ScavengeBoxTempOrg { get; set; }

        /// <summary>
        /// 扫气箱温度
        /// </summary>
        public string ScavengeBoxTemp => ScavengeBoxTempOrg?.ToString();


        /// <summary>
        /// 燃油进机压力时间戳
        /// </summary>
        public DateTime? FuelInPressureTs { get; set; }

        /// <summary>
        /// 燃油进机压力Td原始值
        /// </summary>
        public float? FuelInPressureOrg { get; set; }

        /// <summary>
        /// 燃油进机压力
        /// </summary>
        public string FuelInPressure => FuelInPressureOrg?.ToString();

        /// <summary>
        /// 燃油进机温度时间戳
        /// </summary>
        public DateTime? FuelInTempTs { get; set; }

        /// <summary>
        /// 燃油进机温度Td原始值
        /// </summary>
        public float? FuelInTempOrg { get; set; }

        /// <summary>
        /// 燃油进机温度
        /// </summary>
        public string FuelInTemp => FuelInTempOrg?.ToString();



        /// <summary>
        /// 主机滑油进口压力时间戳
        /// </summary>
        public DateTime? MainEngineLubeInPressureTs { get; set; }

        /// <summary>
        /// 主机滑油进口压力Td原始值
        /// </summary>
        public float? MainEngineLubeInPressureOrg { get; set; }

        /// <summary>
        /// 主机滑油进口压力
        /// </summary>
        public string MainEngineLubeInPressure => MainEngineLubeInPressureOrg?.ToString();


        /// <summary>
        /// 活塞冷却油进口压力时间戳
        /// </summary>
        public DateTime? PistonCoolingOilInPressureTs { get; set; }

        /// <summary>
        /// 活塞冷却油进口压力Td原始值
        /// </summary>
        public float? PistonCoolingOilInPressureOrg { get; set; }

        /// <summary>
        /// 主机滑油和活塞冷却油进口压力
        /// </summary>
        public string PistonCoolingOilInPressure => PistonCoolingOilInPressureOrg?.ToString();


        /// <summary>
        /// 主机滑油进口温度时间戳
        /// </summary>
        public DateTime? MainEngineLubeInTempTs { get; set; }

        /// <summary>
        /// 主机滑油进口温度Td原始值
        /// </summary>
        public float? MainEngineLubeInTempOrg { get; set; }

        /// <summary>
        /// 主机滑油进口温度
        /// </summary>
        public string MainEngineLubeInTemp => MainEngineLubeInTempOrg?.ToString();


        /// <summary>
        /// 活塞冷却油进口温度时间戳
        /// </summary>
        public DateTime? PistonCoolingOilInTempTs { get; set; }

        /// <summary>
        /// 活塞冷却油进口温度Td原始值
        /// </summary>
        public float? PistonCoolingOilInTempOrg { get; set; }

        /// <summary>
        /// 活塞冷却油进口温度
        /// </summary>
        public string PistonCoolingOilInTemp => PistonCoolingOilInTempOrg?.ToString();



        /// <summary>
        /// 主轴承滑油进口压力时间戳
        /// </summary>
        public DateTime? MainLubeInPressureTs { get; set; }

        /// <summary>
        /// 主轴承滑油进口压力Td原始值
        /// </summary>
        public float? MainLubeInPressureOrg { get; set; }

        /// <summary>
        /// 主轴承滑油进口压力
        /// </summary>
        public string MainLubeInPressure => MainLubeInPressureOrg?.ToString();


        /// <summary>
        /// 推力轴承滑油进口压力时间戳
        /// </summary>
        public DateTime? ThrustBearingLubeInPressureTs { get; set; }

        /// <summary>
        /// 推力轴承滑油进口压力Td原始值
        /// </summary>
        public float? ThrustBearingLubeInPressureOrg { get; set; }

        /// <summary>
        /// 推力轴承滑油进口压力
        /// </summary>
        public string ThrustBearingLubeInPressure => ThrustBearingLubeInPressureOrg?.ToString();


        /// <summary>
        /// 推力轴承温度时间戳
        /// </summary>
        public DateTime? ThrustBearingTempTs { get; set; }

        /// <summary>
        /// 推力轴承温度Td原始值
        /// </summary>
        public float? ThrustBearingTempOrg { get; set; }

        /// <summary>
        /// 推力轴承温度
        /// </summary>
        public string ThrustBearingTemp => ThrustBearingTempOrg?.ToString();


        /// <summary>
        /// 进油粘度时间戳
        /// </summary>
        public DateTime? OilInViscosityTs { get; set; }

        /// <summary>
        /// 进油粘度Td原始值
        /// </summary>
        public float? OilInViscosityOrg { get; set; }

        /// <summary>
        /// 进油粘度
        /// </summary>
        public string OilInViscosity => OilInViscosityOrg?.ToString();


        /// <summary>
        /// 启动空气压力时间戳
        /// </summary>
        public DateTime? StartUpAirPresTs { get; set; }

        /// <summary>
        /// 启动空气压力Td原始值
        /// </summary>
        public float? StartUpAirPresOrg { get; set; }

        /// <summary>
        /// 启动空气压力
        /// </summary>
        public string StartUpAirPres => StartUpAirPresOrg?.ToString();

        /// <summary>
        /// 排气平均温度时间戳
        /// </summary>
        public DateTime? ExhaustAvgTempTs { get; set; }

        /// <summary>
        /// 排气平均温度Td原始值
        /// </summary>
        public float? ExhaustAvgTempOrg { get; set; }

        /// <summary>
        /// 排气平均温度
        /// </summary>
        public string ExhaustAvgTemp => ExhaustAvgTempOrg?.ToString();


    }
}
